package com.vietthangif.project.Views;

import java.util.ArrayList;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import com.vietthangif.project.contact.Contact;
import com.vietthangif.project.contact.Entry;
import com.vietthangif.project.silentcontact.R;

public class SelectImportActivity extends Activity {
	public final static int SUCCESS_RETURN_CODE = 1;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_select_import);
		
		Button btSelectLocal = (Button)findViewById(R.id.bt_select_local);
		btSelectLocal.setOnClickListener(selectLocalListener);
		Button btNetworkLocal = (Button)findViewById(R.id.bt_select_network);
		btNetworkLocal.setOnClickListener(selectNetworkListener);
	}
	
	private View.OnClickListener selectLocalListener = new View.OnClickListener() {
		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
//			ArrayList<Entry> contacts = Contact.loadContact(getApplicationContext());
//			Intent intent = new Intent();
//			intent.putStringArrayListExtra("contacts", contacts);
//			setResult(SUCCESS_RETURN_CODE, intent);
//			finish();
		}
	};
	
	private View.OnClickListener selectNetworkListener = new View.OnClickListener() {
		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			Toast.makeText(getApplicationContext(), "Select Network", Toast.LENGTH_SHORT).show();
			finish();
		}
	};
}
